<section id="setuser">
    <section class="userTop">
        <header nz-row>
            <div nz-col [nzSpan]="6">
                <label>
                    <span>派车单编号</span>
                </label>
                <nz-input [(ngModel)]="parts.dispatchOrderNo" [nzPlaceHolder]="'请输入派车单编号'" [nzSize]="'large'"></nz-input>
            </div>
            <div nz-col [nzSpan]="6">
                <label>
                    <span>发货日期</span>
                </label>

                <nz-datepicker [nzSize]="'large'" [(ngModel)]="deliverTime" [nzPlaceHolder]="'请输入时间'" [nzFormat]="'YYYY-MM-DD'"></nz-datepicker>
            </div>
            <div nz-col [nzSpan]="6">
                <label>
                    <span>车辆类型</span>
                </label>
                <nz-select style="width:60%;margin-left:15px" [(ngModel)]="parts.carType" [nzPlaceHolder]="'请选择'" [nzSize]="'large'" nzAllowClear>
                    <nz-option *ngFor="let option of optionCarType" [nzLabel]="option.label" [nzValue]="option.value" [nzDisabled]="option.disabled">
                    </nz-option>
                </nz-select>
            </div>
            <div nz-col [nzSpan]="6">
                <label>
                    <span>状态</span>
                </label>
                <nz-select style="width:60%;margin-left:15px" [(ngModel)]="parts.orderStatus" [nzPlaceHolder]="'请选择'" [nzSize]="'large'" nzAllowClear>
                    <nz-option *ngFor="let option of optionOrderStatus" [nzLabel]="option.label" [nzValue]="option.value" [nzDisabled]="option.disabled">
                    </nz-option>
                </nz-select>
            </div>
            <div nz-col [nzSpan]="6" class="twoline">
                <label>
                    <p>结算状态</p>
                </label>
                <nz-select style="width:60%;margin-left:15px" [(ngModel)]="parts.payStatus" [nzPlaceHolder]="'请选择'" [nzSize]="'large'" nzAllowClear>
                    <nz-option *ngFor="let option of optionPayStatus" [nzLabel]="option.label" [nzValue]="option.value" [nzDisabled]="option.disabled">
                    </nz-option>
                </nz-select>
            </div>
        </header>
        <main class="clearfix">
            <button class="fr" nz-button [nzType]="'primary'" (click)="loadAll()">
              <i class="anticon anticon-search"></i><span>检索</span>
            </button>
        </main>
        <footer>
            <!--  <button nz-button [nzType]="'default'" routerLink="../car-new">
              <span>添加</span>
            </button> -->
        </footer>
    </section>
    <section>
        <main>
            <nz-table #nzTable [nzTotal]="_total" [nzAjaxData]="data" [nzPageSize]="10" [nzPageIndex]="pageIndex" (nzPageIndexChange)='resetIndex($event)'>
                <thead nz-thead>
                    <tr>
                        <th nz-th><span>序号</span></th>
                        <th nz-th><span>派车单编号</span></th>
                        <th nz-th><span>项目编号</span></th>
                        <th nz-th><span>发货日期</span></th>
                        <th nz-th><span>车辆类型</span></th>
                        <th nz-th><span>挂车</span></th>
                        <th nz-th><span>出货地点</span></th>
                        <th nz-th><span>卸货地点</span></th>
                        <th nz-th><span>承运司机</span></th>
                        <th nz-th><span>运费（元）</span></th>
                        <th nz-th><span>状态</span></th>
                        <th nz-th><span>结算</span></th>
                        <th nz-th><span>操作</span></th>
                    </tr>
                </thead>
                <tbody nz-tbody>
                    <tr nz-tbody-tr *ngFor="let data of nzTable.data;let i = index">

                        <td nz-td>
                            {{i+1}}
                        </td>
                        <td nz-td>{{data.dispatchOrderNo}}</td>
                        <td nz-td>{{data.orderNo}}</td>
                        <td nz-td>{{data.deliverTime}}</td>
                        <td nz-td>{{data.carType}}</td>
                        <td nz-td>{{data.isTrailer}}</td>
                        <td nz-td>{{data.startingCity}}</td>
                        <td nz-td>{{data.endCity}}</td>
                        <td nz-td>{{data.driverName}}</td>
                        <td nz-td>{{data.freight}}</td>
                        <td nz-td>{{data.orderStatus}}</td>
                        <td nz-td>{{data.payStatus}}</td>
                        <td nz-td>
                            <button nz-button [nzType]="'default'" [routerLink]="['../carinfo', data.dispatchOrderId ]">
                              <span>查看</span>
                            </button>
                            <button nz-button [nzType]="'default'" [routerLink]="['../carinfo', data.dispatchOrderId,'edit' ]">
                              <span>编辑</span>
                            </button>
                        </td>
                    </tr>
                </tbody>
            </nz-table>
        </main>
    </section>
</section>